<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/header.jsp" %>
<%@ include file="/common/datatables.jsp" %>
<script type="text/javascript">

var scripts = [null, null];
$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
	
	var dataTables = $("#query_result").dataTable({
		"bProcessing": true,
		"bServerSide": true,
		"bDestroy":true,
		"bSort": false,
		"bFilter": false,
		"bAutoWidth": false,
		"sPaginationType": "full_numbers",
		"oLanguage" : oLanguage,
		"fnServerParams": function ( aoData ) {
				aoData.push( { "name": "title", "value": "${log.title}" } );
				aoData.push( { "name": "type", "value": "${log.type}" } );
				aoData.push( { "name": "createBy", "value": "${log.createBy}" } );
				aoData.push( { "name": "requestMethod", "value": "${log.requestMethod}" } );
				aoData.push( { "name": "startDate", "value": "${log.startDate}" } );
				aoData.push( { "name": "endDate", "value": "${log.endDate}" } );
		},
		"sAjaxSource": "${ctx}/log/list.do",
		"fnServerData": fnDataTablesPipeline,
		"sServerMethod": "POST"
	});
    
    var active_class = 'success';
    $('#query_result').on('click', 'tbody tr' , function(){
    	var $row = $(this).closest('tr');	
    	if ($row.hasClass(active_class) == false) {
    		dataTables.$('tr.' + active_class).removeClass(active_class);
    		$row.addClass(active_class);				
    	}
    });	
});

</script>

<div class="row" id="menuListTableFrame">
	<div class="col-xs-12">
		<div class="row">
			<div class="col-xs-12">
				<div class="table-header">
					日志列表
				</div>

				<div>
					<table id="query_result" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
									<th style="text-align:center;">日志标题</th>
						             <th style="text-align:center;">日志类型</th>
						             <th style="text-align:center;">生成时间</th>
						             <th style="text-align:center;">操作用户</th>
						             <th style="text-align:center;">操作URL</th>
						             <th style="text-align:center;">请求方式</th>
							</tr>
						</thead>
						<tbody>
						  						
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
